Skip to content

Commit

Permalink
Remove more unused
Browse files Browse the repository at this point in the history
  • Loading branch information
kplatis committed Aug 9, 2024
1 parent d6439e1 commit 6fafb4d
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 26 deletions.
2 changes: 1 addition & 1 deletion src/components/ThreeDeeBrain/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ export const createMesh = (data: string, color: string) => {
* Builds the geometry of the point cloud
* @param points
*/
export function buildGeometry(points: Point[]) {
function buildGeometry(points: Point[]) {
const geometry = new ThreeBufferGeometry();
const vertices: number[] = [];
points.forEach((elem) => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/TreeNavItem/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ type TreeNavItemProps = {
* @param {(newValue: string[], path: string[]) => void} args.onValueChange - A callback.
* @param {string[]} args.path - Used for tracking the "current" nav depth level.
*/
export function TreeNavItem({
function TreeNavItem({
children,
className = 'ml-3',
id,
Expand Down
2 changes: 1 addition & 1 deletion src/components/VirtualLab/Billing/PaymentForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ const buildStripeFormOptions = (clientSecret: string): StripeElementsOptions =>
},
});

export function Form({ virtualLabId, toggleOpenStripeForm }: PaymentFormProps) {
function Form({ virtualLabId, toggleOpenStripeForm }: PaymentFormProps) {
const accessToken = useAccessToken();
const elements = useElements();
const stripe = useStripe();
Expand Down
5 changes: 0 additions & 5 deletions src/components/VirtualLab/Billing/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,6 @@ const getStripe = () => {

export default getStripe;

export function getErrorMessage(error: unknown) {
if (error instanceof Error) return error.message;
return String(error);
}

export function formatCurrency(amount: number) {
const formatter = new Intl.NumberFormat('en-US', {
style: 'currency',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export type PlanPanelProps = {
onSelect(plan: VirtualLabPlanDefinition): void;
};

export function PlanPanel({ plan, selected, onSelect }: PlanPanelProps) {
function PlanPanel({ plan, selected, onSelect }: PlanPanelProps) {
const handleClick = () => {
onSelect(plan);
};
Expand Down
16 changes: 0 additions & 16 deletions src/components/build-section/BrainRegionSelector/util.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { formatNumber } from '@/util/common';
import { CalculatedCompositionPair } from '@/types/composition/calculation';
import { NavValue } from '@/state/brain-regions/types';

/**
* Calculates the metric to be displayed based on whether count or density is
Expand All @@ -20,18 +19,3 @@ export function getMetric(

return null;
}

/**
*
* @param input NavValue object with nested object (ex: brain regions expanded nodes)
* @returns result string[] all the deeply nested keys of the input
*/
export function getNestedKeysDeeply(input: NavValue, result: Array<string> = []) {
if (input) {
for (const [key, value] of Object.entries(input)) {
result.push(key);
if (value !== null && typeof value === 'object') return getNestedKeysDeeply(value, result);
}
}
return result;
}
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ type MTypeEntryProps = {
isExpanded: boolean;
};

export function MTypeEntry({ name, onExpand, isExpanded }: MTypeEntryProps) {
function MTypeEntry({ name, onExpand, isExpanded }: MTypeEntryProps) {
return (
<button
onClick={onExpand}
Expand Down

0 comments on commit 6fafb4d

Please sign in to comment.