mirror of
https://github.com/outline/outline.git
synced 2026-11-21 21:44:30 +03:00
* Implement UnfurlsStore * simplify lookup * refetch unfurl after X elapsed time * compute fetchedAt in client
19 lines
385 B
TypeScript
19 lines
385 B
TypeScript
import { observable } from "mobx";
|
|
import { UnfurlResourceType, UnfurlResponse } from "@shared/types";
|
|
import Model from "./base/Model";
|
|
|
|
class Unfurl<UnfurlType extends UnfurlResourceType> extends Model {
|
|
static modelName = "Unfurl";
|
|
|
|
@observable
|
|
type: UnfurlType;
|
|
|
|
@observable
|
|
data: UnfurlResponse[UnfurlType];
|
|
|
|
@observable
|
|
fetchedAt: string;
|
|
}
|
|
|
|
export default Unfurl;
|