You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
626 B
16 lines
626 B
import type { FunctionComponent } from "react";
|
|
import React from "react";
|
|
import { useResource, useSubject } from "@ldo/solid-react";
|
|
import { SolidProfileShapeShapeType } from "../.ldo/solidProfile.shapeTypes";
|
|
|
|
export const PostedBy: FunctionComponent<{ webId: string }> = ({ webId }) => {
|
|
const webIdResource = useResource(webId);
|
|
const profile = useSubject(SolidProfileShapeShapeType, webId);
|
|
|
|
if (webIdResource.isReading()) {
|
|
return <p>Loading Profile...</p>;
|
|
} else if (webIdResource.status.isError) {
|
|
return <p>Error: {webIdResource.status.message}</p>;
|
|
}
|
|
return <p>Posted By: {profile.fn}</p>;
|
|
};
|
|
|