Skip to content

Commit

Permalink
Merge pull request #192 from rit-sse/fixed-golink-buttons
Browse files Browse the repository at this point in the history
fixed-golink-buttons
  • Loading branch information
Saoski authored Nov 17, 2024
2 parents 3c6ad96 + ed68c8a commit 14c47b8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions next/app/go/MakeNewGoLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@ export const GoLinkButton: React.FC<CreateGoLinkProps> = ({ fetchData }) => {
const [isOfficer, setIsOfficer] = useState(false);

useEffect(() => {
async () => {
(async () => {
const data = await fetch("/api/authLevel").then((response) =>
response.json()
);
console.log(data);
setIsOfficer(data.isOfficer);
};
})();
}, []);

if (isOfficer) {
Expand Down
2 changes: 1 addition & 1 deletion next/app/go/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const GoLinksPage = () => {
description: string;
isPinned: boolean;
isPublic: boolean;
}[] = await fetch("/api/golinks/").then((response) => response.json());
}[] = await fetch("/api/golinks/public").then((response) => response.json());
setGoLinkData(
data.map((item) => ({
id: item.id,
Expand Down

0 comments on commit 14c47b8

Please sign in to comment.