diff --git a/components/Navigation.tsx b/components/Navigation.tsx
index dfa24f1..972bfb2 100644
--- a/components/Navigation.tsx
+++ b/components/Navigation.tsx
@@ -102,7 +102,7 @@ const Navigation = () => {
) : (
<>
- {snap.files?.[0]?.name || "XRPL Hooks"}
+ {snap.gistName || "XRPL Hooks"}
{
});
state.files = files;
state.gistId = gistId;
- state.gistName = Object.keys(res.data.files)?.[0] || "untitled";
state.gistOwner = res.data.owner?.login;
-
+
+ const gistName = files.find(file => file.language === 'c' || file.language === 'javascript')?.name || "untitled";
+ state.gistName = gistName
} catch (err) {
let message: string
if (err instanceof Error) message = err.message