Skip to content

Commit

Permalink
fix: pins missing (#1494)
Browse files Browse the repository at this point in the history
* fix: fetch tokens so pins display

* chore: reverting non-mandatory changes
  • Loading branch information
drewdelano authored Jun 16, 2022
1 parent ebe9bd0 commit 4fe0120
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ const FilesManager = ({ className, content, onFileUpload }) => {
storageData: { refetch },
info,
} = useUser();
const { tokens } = useTokens();
const { tokens, getTokens } = useTokens();

const [currentTab, setCurrentTab] = useState('uploaded');
const [files, setFiles] = useState(/** @type {any} */ (uploads));
Expand Down Expand Up @@ -115,6 +115,9 @@ const FilesManager = ({ className, content, onFileUpload }) => {
listPinned('pinned', apiToken);
}
}, [fetchPinsDate, listPinned, isFetchingPinned, apiToken]);
useEffect(() => {
getTokens()
}, []);

// Set displayed files based on tab selection: 'uploaded' or 'pinned'
useEffect(() => {
Expand Down

0 comments on commit 4fe0120

Please sign in to comment.