Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug Fix During Model Enhancement #308

Merged
merged 4 commits into from
Dec 6, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chore: enabled enhancement for all authenticated users
jeafreezy committed Dec 6, 2024
commit 541237cbe1085bb7035c914c429bb7948db14654
7 changes: 4 additions & 3 deletions frontend/src/app/routes/models/model-details.tsx
Original file line number Diff line number Diff line change
@@ -33,7 +33,7 @@ export const ModelDetailsPage = () => {
} = useDialog();
const navigate = useNavigate();
const { data, isPending, isError, error } = useModelDetails(id as string, id !== undefined, 10000);
const { user } = useAuth();
const { isAuthenticated } = useAuth();

useEffect(() => {
if (isError) {
@@ -55,7 +55,7 @@ export const ModelDetailsPage = () => {
if (isPending || isError) {
return <ModelDetailsSkeleton />;
}
const isOwner = user?.osm_id === data?.user?.osm_id;


return (
<>
@@ -108,6 +108,7 @@ export const ModelDetailsPage = () => {
size="medium"
prefixIcon={StarStackIcon}
onClick={openModelEnhancementDialog}
disabled={!isAuthenticated}
/>
</div>
{/* mobile */}
@@ -123,7 +124,7 @@ export const ModelDetailsPage = () => {
size="medium"
prefixIcon={StarStackIcon}
onClick={openModelEnhancementDialog}
disabled={!isOwner}
disabled={!isAuthenticated}
/>
</div>
<TrainingHistoryTable