Skip to content

Commit

Permalink
Fix htmx forms
Browse files Browse the repository at this point in the history
  • Loading branch information
smdsgn committed Oct 3, 2024
1 parent e0eb4ad commit 8dd6574
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions assets/scripts/components/layout/TopBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ const ItemContent = styled.div`
const TopBar: React.FC = () => {
const projectData = useSelector((state: RootState) => state.project.projectData);
const memoizedProjectData = useMemo(() => projectData, [projectData?.id]);
const htmxRef = useHtmx([memoizedProjectData]);
const formattedDate = useMemo(() => formatDateTime(new Date(memoizedProjectData?.created_date)), [memoizedProjectData?.created_date]);
const urls = useUrls();
const htmxRef = useHtmx([memoizedProjectData, urls]);
const formattedDate = useMemo(() => formatDateTime(new Date(memoizedProjectData?.created_date)), [memoizedProjectData?.created_date]);

return (
<Container ref={htmxRef}>
Expand Down
2 changes: 1 addition & 1 deletion assets/scripts/components/widgets/ProjectDownload.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ const DownloadItemIcon = styled.i`

const ProjectDownload: React.FC = () => {
const projectData = useSelector((state: RootState) => state.project.projectData);
const htmxRef = useHtmx([projectData]);
const urls = useUrls();
const htmxRef = useHtmx([projectData, urls]);

return (
<Container ref={htmxRef}>
Expand Down

0 comments on commit 8dd6574

Please sign in to comment.