MCPcopy
hub / github.com/smapiot/piral / getLanguageUrl

Function getLanguageUrl

src/samples/sample-piral/src/components/LanguageIcon.tsx:3–10  ·  view source on GitHub ↗
(language: string)

Source from the content-addressed store, hash-verified

1import * as React from 'react';
2
3function getLanguageUrl(language: string) {
4 switch (language) {
5 case 'de':
6 return require('../images/de.png');
7 default:
8 return require('../images/en.png');
9 }
10}
11
12export interface LanguageIconProps {
13 language: string;

Callers 1

LanguageIconFunction · 0.85

Calls 1

requireFunction · 0.85

Tested by

no test coverage detected