#Help with FileObject in File DropdownItems

1 messages · Page 1 of 1 (latest)

storm elbow
#

hi. im trying to add a button to the file dropdown menu, but i can't find a way to get the clicked file object.

import React, { useState } from "react";

import { ServerContext } from '@/state/server';
import { join } from 'path';
import { FileObject } from '@/api/server/files/loadDirectory';

const DropDownButton = () => {

    const uuid = ServerContext.useStoreState((state) => state.server.data!.uuid);

    return <h1>dropdown_button</h1>;
};

export default DropDownButton;

basically i want to access the file name inside the component so i can check the file type. and based on the file type the button will appear.

jaunty ploverBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> ✅ Mark Solution