14 lines
333 B
TypeScript
14 lines
333 B
TypeScript
import { DB_BASE_URL } from "@/lib/db";
|
|
|
|
export type Perk = {
|
|
id: string;
|
|
name: string;
|
|
iconFilePath: string;
|
|
role: number;
|
|
};
|
|
|
|
export const getPerkIconUrl = (iconFilePath: string) => {
|
|
const file = (iconFilePath.split('/').pop() ?? '').split('.')[0];
|
|
return `${DB_BASE_URL}/icons/perk-icons/${file}.png`;
|
|
};
|